import unittest
from travel_game.views import calcTemp, crossRiverMoneyCheck, foodChecker, unicorn_kill

## command to run these tests only 
#  python manage.py test travel_game.m12Test

class m12Test(unittest.TestCase):
    # needs to start with test so unittest will run them
    
    #Bill 
    def test_tempCheck(self):
        self.assertEqual(30, calcTemp(2))
        self.assertEqual(110, calcTemp(6))        
    #Corrie
    def test_crossRiverMoneyCheck(self):
        self.assertEqual(False, crossRiverMoneyCheck(2, 35))
        self.assertEqual(True, crossRiverMoneyCheck(100, 20)) 
    #David    
    def test_foodChecker(self):
        self.assertEqual(False, foodChecker(2, 35))
        self.assertEqual(True, foodChecker(100, 20))
    #Reid    
    def test_unicodeCheck(self):
        str1 = u'this is a normal string'
        str2 = u'there are 4 weird chars here \u039A \u03A3 , \u03A6 \u039C '
        
        
        self.assertEqual(len(unicorn_kill(str1)), len(str1))
        self.assertEqual(True, len(unicorn_kill(str2)) != len(str2))
